# @shuaige : 陈世玉
# @name :车辆价格可视化.py
# @time :2024/12/3 15:48
from pyecharts import *
from pyecharts.charts import Bar

f=open('cars_price.csv', 'r', encoding='utf-8')
datas=f.readlines()
f.close()
brands=[]
prices=[]
for data in datas:
    brands.append(data.strip().split(',')[0])
    prices.append(data.strip().split(',')[1])
bar=Bar()
brands.reverse()
prices.reverse()
bar.add_xaxis(brands)
bar.add_yaxis('价格',prices)
bar.render("车辆价格可视化.html")

